]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
notificationDaemon: Clean up code paths
authorJasper St. Pierre <jstpierre@mecheye.net>
Sun, 30 Dec 2012 16:37:43 +0000 (11:37 -0500)
committerJasper St. Pierre <jstpierre@mecheye.net>
Sun, 30 Dec 2012 19:09:39 +0000 (14:09 -0500)
While we really need to clean up the bad MessageTray API, this is
a quick step to allow for a cleaner codebase for the future.

https://bugzilla.gnome.org/show_bug.cgi?id=680414

js/ui/notificationDaemon.js

index 6f63b589d3c3ac64bbf0bc06cb5da1dc6589ef60..3aa86689f569ef8deda2c3773870e06d6dd15b9f 100644 (file)
@@ -358,9 +358,7 @@ const NotificationDaemon = new Lang.Class({
         let gicon = this._iconForNotificationData(icon, hints);
 
         if (notification == null) {
-            notification = new MessageTray.Notification(source, summary, body,
-                                                        { gicon: gicon,
-                                                          bannerMarkup: true });
+            notification = new MessageTray.Notification(source);
             ndata.notification = notification;
             notification.connect('destroy', Lang.bind(this,
                 function(n, reason) {
@@ -383,12 +381,12 @@ const NotificationDaemon = new Lang.Class({
                 function(n, actionId) {
                     this._emitActionInvoked(ndata.id, actionId);
                 }));
-        } else {
-            notification.update(summary, body, { gicon: gicon,
-                                                 bannerMarkup: true,
-                                                 clear: true });
         }
 
+        notification.update(summary, body, { gicon: gicon,
+                                             bannerMarkup: true,
+                                             clear: true });
+
         // We only display a large image if an icon is also specified.
         if (icon && (hints['image-data'] || hints['image-path'])) {
             let image = null;